﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ItCool.Web.Models.Article>>" %>
 <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="content">
        <%Html.RenderPartial("usercenter/menu");%>
        <%: Html.ValidationSummary(true) %>
        <div class="userMain">
            <h2 class="title">
                我发布的信息
            </h2>
            <div class="u_box">
            <div class="info">
                <ul >
                    <% PagedList<Article> list = this.Model as PagedList<Article>; %>
                    <%foreach (var item in list)
                      { %>
                    <li>
                        <%=Html.ActionLink(item.Title, "item","Article", new { id = item.ID }, new { target = "_blank" })%>
                        <span class="date">
                            <%=item.DateCreated.ToString("yyyy-MM-dd") %></span>
                        <%=Html.ActionLink("修改", "editarticle", "usercenter", new { id = item.ID },null)%>
                        <%=Html.ActionLink("删除", "Delete", "article", new { id = item.ID, page = Request.Params["page"] }, new { @onclick = "return confirm('你确认删除信息吗？');" })%>
                    </li>
                    <%} %>
                </ul>
            </div>
            </div>
            <%=Html.Pager(list.PageSize,list.PageNumber,list.TotalItemCount) %>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMeta" runat="server">
    <link type="text/css" rel="stylesheet" href="/css/userCenter.css" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphFooter" runat="server">
</asp:Content>
